//package jmind.core.rebbitmq;
//
//import com.rabbitmq.client.Envelope;
//import jmind.base.lang.SourceProperties;
//import jmind.core.rabbitmq.ExchangeType;
//import jmind.core.rabbitmq.RabbitmqConsumer;
//import jmind.core.rabbitmq.RabbitmqProducer;
//
//import java.io.IOException;
//import java.util.concurrent.TimeoutException;
//
///**
// * Created by xieweibo on 2016/10/31.
// */
//public class MyMqConsumer  extends RabbitmqConsumer{
//    public   static final String queueName = "Selection";
//    public  static final String exchangeName = "exdispatch";
//    public MyMqConsumer() throws IOException, TimeoutException {
//         super("choose", SourceProperties.getDataSource(), queueName, exchangeName, queueName, false);
//
//    }
//
//    @Override
//    protected boolean consume(Envelope envelope, byte[] body) {
//        System.err.println(envelope+"="+new String(body));
//        return false;
//    }
//
//
//    public static void main(String[] args) throws IOException, TimeoutException {
//        System.err.println(SourceProperties.getDataSource());
//        MyMqConsumer consumer=new MyMqConsumer();
//        RabbitmqProducer producer = new RabbitmqProducer("choose", SourceProperties.getDataSource(), queueName, exchangeName, ExchangeType.direct, true);
//        producer.produce(queueName,"i am ok");
//    }
//}
